ViewStubCompat

Backport of android.view.ViewStub so that we can set the android.view.LayoutInflater on devices before Jelly Bean.

Constructors

Link copied to clipboard
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet)
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyle: Int)

Types

Link copied to clipboard
Listener used to receive a notification after a ViewStub has successfully inflated its layout resource.

Functions

Link copied to clipboard
open fun draw(@NonNull canvas: @NonNull Canvas)
Link copied to clipboard
open fun getInflatedId(): Int
Returns the id taken by the inflated view.
Link copied to clipboard
Get current LayoutInflater used in inflate.
Link copied to clipboard
Returns the layout resource that will be used by setVisibility or inflate to replace this StubbedView in its parent by another view.
Link copied to clipboard
open fun inflate(): View
Inflates the layout resource identified by getLayoutResource and replaces this StubbedView in its parent by the inflated layout resource.
Link copied to clipboard
open fun setInflatedId(inflatedId: Int)
Defines the id taken by the inflated view.
Link copied to clipboard
open fun setLayoutInflater(inflater: LayoutInflater)
Set LayoutInflater to use in inflate, or null to use the default.
Link copied to clipboard
open fun setLayoutResource(layoutResource: Int)
Specifies the layout resource to inflate when this StubbedView becomes visible or invisible or when inflate is invoked.
Link copied to clipboard
Specifies the inflate listener to be notified after this ViewStub successfully inflated its layout resource.
Link copied to clipboard
open fun setVisibility(visibility: Int)
When visibility is set to VISIBLE or INVISIBLE, inflate is invoked and this StubbedView is replaced in its parent by the inflated layout resource.